<?php

$sql['get_list_dosen']="
SELECT 
  	dsnId AS data,
  	concat(dsnNama,' (',IF(ulgIsLogin=1,'Online','Offline'),')')AS label
  FROM
  	r_dosen_bimbingan
  LEFT JOIN u_dosen ON dsnbimDsnId=dsnId
	LEFT JOIN u_user_login ON dsnUldId=ulgId
  WHERE
   dsnbimMhsId='%s'
   
";

$sql['get_info_mhs']="
  SELECT 
    mhsId AS MHS_ID,
    mhsUlgId AS MHS_USERNAME,
  	IFNULL(mhsNim,'n/a') AS MHS_NIM,
  	IFNULL(mhsNama,'n/a') AS MHS_NAMA,
  	IFNULL(mhsAngkatan,'n/a') AS MHS_ANGKATAN,
  	IFNULL(mhsEmail,'n/a') AS MHS_EMAIL,
  	IFNULL(mhsAlamat,'n/a') AS MHS_ALAMAT,
  	IFNULL(mhsNoTelp,'n/a') AS MHS_NO_TELP,
  		IF(ulgIsLogin=1,'Online','Offline') AS MHS_STATUS
  FROM u_mahasiswa
  LEFT JOIN u_user_login ON ulgId=mhsUlgId
  WHERE mhsId='%s'
  OR mhsUlgId ='%s'
";

/*$sql['get_tugas_akhir_mhs']="
  SELECT 
  tatpkId as TOPIK_ID,
  	tatpkNama AS TOPIK,
  	taJudul AS JUDUL,
  	taSemesterDaftar AS SEMESTER,
  	tastatNama AS STATUS
  FROM
  	u_tugas_akhir
  LEFT JOIN i_tugas_akhir_topik ON tatpkId=taTopikId
  LEFT JOIN i_tugas_akhir_status ON taStatusId=tastatId
  WHERE taMhsId='%s'
";*/
$sql['get_tugas_akhir_mhs']="
   SELECT 
   	taId AS data,
	   LEFT(taJudul,22) AS label
   FROM
   	u_tugas_akhir
   WHERE 
   taMhsId='%s'";

$sql['get_ta_dok_mhs']="
  SELECT 
  	tadokNama AS NAMA_DOK,
  	tadokDeskripsi AS DESK_DOK
  FROM
  	i_tugas_akhir_dokumen
  LEFT JOIN u_tugas_akhir ON taId=tadokTaId
  WHERE taMhsId='%s'
";
$sql['do_update_profil_mhs']="
   UPDATE u_mahasiswa 
   	SET
   	mhsNama = '%s' , 
   	mhsAlamat = '%s' , 
   	mhsNoTelp = '%s' , 
   	mhsEmail = '%s' 
   	WHERE
   	mhsId = '%s' 
";

?>
